<?php
/*
	邀请用户列表
*/

defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
$return=array();
if($_RQ['op']=='list'){
	$params=array('agent_id'=>$_SESSION['uniacid']);
	$orderby='uniacid desc';
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$fields=array('uniacid','title');
	$total='';
	$list=pdo_getslice('core_accounts',$params,array($pindex,$psize),$total,$fields,'',$orderby);
	$return['list']=$list;
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	$htmls=array(
		'type'=>'list',
		'tabs'=>array(
			array('op'=>'list','title'=>'邀请的客户列表'),
		),
		'list'=>array('data'=>'list','key'=>'uniacid','edit'=>false,'delall'=>false,'list'=>array(
			array('name'=>'title','title'=>'站点名称','type'=>'string'),
		)),
	);
	$return['htmls']=$htmls;
	exi($return);
}

?>